﻿@model VideoCache.Server.MVCWeb.Areas.Member.Models.UserModel

@{
    ViewBag.Title = "个人资料";
    Layout = "~/Areas/Member/Views/Shared/_Layout.cshtml";
}
@section script
{
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.locationSelect.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#Birthday").datepicker({
            changeMonth: true,
            changeYear: true,
            yearRange: 'c-70'//前30年和后10年
        });

        $.locationSelect("Province", "City");
    });
</script>
}
@section css
{
<link href="@Url.Content("~/content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
}
<h2>@ViewBag.Title</h2>
<div class="formContent">
@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
        <div class="unit">
            @Html.LabelFor(model => model.UserName)
            @Html.EditorFor(model => model.UserName)
            @Html.ValidationMessageFor(model => model.UserName)
        </div>

        <div class="unit">
            @Html.LabelFor(model => model.NickName)
            @Html.EditorFor(model => model.NickName)
            @Html.ValidationMessageFor(model => model.NickName)
        </div>

        <div class="unit">
            @Html.LabelFor(model => model.Email)
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>

        <div class="unit">
            @Html.LabelFor(model => model.RealName)
            @Html.EditorFor(model => model.RealName)
            @Html.ValidationMessageFor(model => model.RealName)
        </div>
    
        <div class="unit">
            @Html.LabelFor(model => model.Sex)
            @Html.EditorFor(model => model.Sex)
            @Html.ValidationMessageFor(model => model.Sex)
        </div>

        <div class="unit">
            @Html.LabelFor(model => model.Birthday)
            @Html.EditorFor(model => model.Birthday)
            @Html.ValidationMessageFor(model => model.Birthday)
        </div>

        <div class="unit">
            @Html.LabelFor(model => model.Telephone)
            @Html.EditorFor(model => model.Telephone)
            @Html.ValidationMessageFor(model => model.Telephone)
        </div>

        <div class="unit">
            @Html.LabelFor(model => model.MobilePhone)
            @Html.EditorFor(model => model.MobilePhone)
            @Html.ValidationMessageFor(model => model.MobilePhone)
        </div>

        <div class="unit">
            @Html.LabelFor(model => model.Province)
            <select name="Province" id="Province"></select>
            <select name="City" id="City"></select>
            @Html.ValidationMessageFor(model => model.Province)
        </div>

        <div class="unit">
            @Html.LabelFor(model => model.City)
            @Html.EditorFor(model => model.City)
            @Html.ValidationMessageFor(model => model.City)
        </div>

        <div class="unit">
            <label></label>
            <input type="submit" value="保存" />
        </div>
}
</div>